<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>浮窗</title>
<link rel="stylesheet" href="../css/bootstrap.min.css" />
<link rel="stylesheet" href="../css/style.css" />
</head>
<body class="new-body">
	<div class="business-bridge">
		<div class="business-bridge-top">
			<div class="business-bridge-title">
				留下联系方式可获得原昇<br>优化师一对一拓词指导服务
			</div>
			<!-- <img src="../img/off_white.png" class="js-off-white"> -->
		</div>
		<div class="business-bridge-mian">
			<div class="bridge-mian-message">
				<img src="../img/company.png" class="company-ico"> <input
					type="text" placeholder="请输入公司名" class="js-company-name">
			</div>
			<div class="bridge-mian-message p-t18">
				<img src="../img/phone.png" class="phone-ico"> <input
					type="text" placeholder="请输入手机号" class="js-phone">
			</div>
		</div>
		<div class="business-bridge-bottom">
			<div class="business-bridge-button js-submit">立即提交</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="../js/bootstrap.min.js"></script>
<script type="text/javascript">
	$(function() {
		$(".js-submit").click(function() {
			var company = $(".js-company-name").val();
			var phone = $(".js-phone").val();

			if (company == "" || phone == "") {
				alert("公司名或手机号码不能为空");
			}

			if (!(/^1[34578]\d{9}$/.test(phone))) {
				alert("手机格式不对");
			} else {

				$.get('/companyBackup/save', {
					companyName : company,
					phoneNumber : phone
				}, function(result) {
					if (result.result > 0) {
						alert("提交成功,我们将尽快与您取得联系!");
						$(".js-company-name").val("");
						$(".js-phone").val("");
					} else {
						alert("提交出错!");
					}
				})

			}
		})
	})
</script>
</html>